import request from '@/utils/request'
//根据应用显示角色
//可传type  1平台 2服务商-3备品库 4 小程序
export function getRoleForSearch(data) {
  return request({
    url: '/pri/sys/role/list_for_search',
    method: 'get',
    params: data
  })
}
//查询部门列表用作搜索条件
export function getDepartmentForSearch(data) {
  return request({
    url: '/pri/sys/department/list_for_search',
    method: 'get',
    params: data
  })
}

/**
 *  获取省级数据
 */
export function getProvince(){
    return request({
        url: '/pri/sys/area/list_address',
        method: 'get',
    })
}

/**
 * 获取市级数据
 */
export function getCity(addressId){
    return request({
        url: '/pri/sys/area/list_city',
        method: 'get',
        params: {
            addressId:addressId
        }
    })
}
//省市区树形结构
export function getAreaTree(){
  return request({
    url: '/pri/sys/area/tree',
    method: 'get',
  })
}
// 配件类别
export function listForSearch(data){
  return request({
    url: '/pri/sys/parttype/list_for_search',
    method: 'get',
    params:data
  })
}
